#!/usr/bin/env python
#-*- coding:utf-8 -*-

"""
	PROJECT pyevocomm -

	APP		Core

	MODULE  Main

	SITE DESCRIPTION http://code.google.com/p/pyevocomm/ 

	@copyright: 2012 by archetipo <alessio.gerace@gmail.com>
	@license: New BSD License, see COPYING for details.
"""

import sys
import os
sys.path.insert(0, os.path.join(os.path.dirname(__file__), '../..'))

from operator import setslice

from cocos.director import director
from cocos.layer import *
from cocos.scene import Scene
from cocos.scenes.transitions import *
from cocos.actions import *
from cocos.sprite import *
from cocos.menu import *
from cocos.text import *

import pyglet
from pyglet import gl, font
from pyglet.window import key
import importlib
from evoctrl import *
import Evoview

director.init( resizable=True, width=1366, height=768 )
#~ director.window.set_fullscreen(True)

app='App.Parla'
pyglet.resource.path.append('data')
pyglet.resource.path.append('App/Parla/btn')
pyglet.resource.path.append('App/Parla/mnu')
pyglet.resource.reindex()
mod = importlib.import_module(app+'.model')
model=mod.Model()
sts=importlib.import_module(app+'.status','status')
status=sts.status
ctrl = MainCtrl( model )
appParla=Evoview.get_newgame(model,ctrl)
director.window.set_fullscreen(False)
director.run( appParla)

